-
-
Notifications
You must be signed in to change notification settings - Fork 102
[Store] Add Redis #269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Store] Add Redis #269
Conversation
Could you bring in a rag example as well, please? redis cloud or docker compose maybe |
docker compose if possible please 🙏 |
I added a rag example, with docker compose. I also updated the PR description |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The example is now easy to use & work - thanks for that!
The bundle config looks fishy tho ...
Needs a rebase after #317 |
Open to finish this PR? |
Oupsy, I forgot this one. I'll finish it ASAP |
Here we go!
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minors, afterwards good to merge
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds Redis vector store support to the Symfony AI Store component, enabling developers to use Redis as a backend for vector storage and similarity search operations.
Key changes:
- Implementation of Redis vector store with RedisSearch and JSON support
- Configuration options for Redis connections (direct client or connection parameters)
- Support for different distance metrics (Cosine, L2, IP) and indexing methods
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
src/store/src/Bridge/Redis/Store.php | Core Redis store implementation with vector operations and search functionality |
src/store/src/Bridge/Redis/Distance.php | Enum for Redis distance metrics (Cosine, L2, IP) |
src/store/tests/Bridge/Redis/StoreTest.php | Comprehensive test suite covering all Redis store operations |
src/ai-bundle/src/AiBundle.php | Bundle integration for Redis store configuration |
src/ai-bundle/config/options.php | Configuration schema for Redis store options |
examples/rag/redis.php | Example implementation demonstrating Redis store usage |
examples/compose.yaml | Docker Compose service for Redis development |
src/store/composer.json | Added polyfill dependency for PHP 8.3 features |
src/store/CHANGELOG.md | Documentation update listing Redis as supported store |
src/ai-bundle/tests/DependencyInjection/AiBundleTest.php | Test configuration for Redis store |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
src/ai-bundle/src/AiBundle.php
Outdated
use Symfony\AI\Platform\Bridge\VertexAi\PlatformFactory as VertexAiPlatformFactory; | ||
use Symfony\AI\Platform\Bridge\Voyage\PlatformFactory as VoyagePlatformFactory; | ||
use Symfony\AI\Platform\Exception\RuntimeException; | ||
use Symfony\AI\Platform\Model; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this removal?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not used, isn't?
Lets finish this one @lyrixx 🚀 👏 |
a950ab0
to
8d4e8e9
Compare
Here we go 🚀 ! I hope and think I addressed all comments. Thanks for the review, and sorry for the slow tempo on this one! |
It took time, but here we go, this is in now. Thank you very much @lyrixx. |
I continue to bench different stores, and the next one is Redis
Demo
Symfony configuration
With a custom redis connection
Without a custom redis connection